﻿using AutoMapper;
using Domain.Entity;
using Domain.Repository;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Application.CFTKService
{
    public class CFTKService : ICFTKService
    {
        private readonly IMapper mapper;
        public ICFTKRepository CFTKRepository { get; set; }

        public CFTKService(IMapper mapper, ICFTKRepository CFTKRepository)
        {
            this.mapper = mapper;
            this.CFTKRepository = CFTKRepository;

        }
        public Task<int> AddCFTK(CFTK cFTK)
        {
           return CFTKRepository.AddCFTK(cFTK);
        }

        public Task<int> DeleteCFTK(int id)
        {
            return CFTKRepository.DeleteCFTK(id);
        }

        public List<CFTK> GetCFTK()
        {
            return CFTKRepository.GetCFTK();
        }

        public Task<int> UpdateCFTK(CFTK cFTK)
        {
            return CFTKRepository.UpdateCFTK(cFTK);
        }

		public List<CFTK> GetCFTKName(string name)
		{
			return CFTKRepository.GetCFTKName(name);
		}
	}
}
